home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
encrypt
/
md5test.asp
< prev
next >
Wrap
Text File
|
1998-05-21
|
1KB
|
45 lines
<html>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Set md5 = Server.CreateObject("YEncrypt.MD5")
EncryptedPassword = md5.Encrypt(Request.Form("password"))
Set md5 = Nothing
%>
The encrypted form of the password you entered is:<p>
<b><%=EncryptedPassword%></b><p>
Use it to compare against the passwords you store in your user database.
<%
Else
%>
<p>This sample ASP page shows the use of the MD5 encryption component. The password
entered is encrypted by the MD5 component and the resulting hash can be further compared
against the encrypted password database on the server. MD5 hashes are always 32 characters
long.</p>
<table border="1" cellpadding="15">
<tr>
<td width="89%"><form method="POST">
<p>Enter your password: </p>
<p><input type="password" name="password" size="20"></p>
<p><input type="submit" value="Submit" name="Submit"></p>
</form>
</td>
</tr>
</table>
<%
End If
%>
<p> </p>
<p>Copyright 1998 Yuri Software <a href="http://www.yurisw.com">http://www.yurisw.com</a> </p>
</body>
</html>